Repository navigation
Say what the install ID needs and what isBot and pagePath fall back to - #39
Conversation
A documentation sweep against trace-client.ts. The README intro listed the runtime APIs as fetch, AbortController, setTimeout and URL only, though the optional install ID also uses crypto.randomUUID and process.getBuiltinModule when they are present. The heading "Every event carries a random installation ID" overclaimed, since the tag is sent only when the program configures an ID. The README now also covers isBot() treating a missing or blank User-Agent as a bot, and pagePath()'s "/" fallback. The MAX_VERSION_LENGTH doc comment now says it bounds installId too. No behavior changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Self-review rubric (anchored on CI run 42442024350:
Judgment note (non-blocking): README.md, in the new intro sentence, says "does without them when they are not". That is accurate for Do-not-auto-merge path check: no protected path matched. There is no version change, no wire-format change, no package.json/tsconfig.json change, and no file with more than 50 deleted lines. This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
Summary
Stage A documentation accuracy sweep: every source of truth was checked against
trace-client.ts, and the drift below was fixed in the docs. No behavior changed.fetch,AbortController,setTimeoutandURL(plusprocess.env). The optional installation ID also usescrypto.randomUUID(randomId(), guarded, with aMath.random()fallback) andprocess.getBuiltinModule(builtin(), guarded). The file header already mentions the second. The intro now names both and links to the installation-ID section.installtag is sent only wheninstallIdorinstallIdFileis given (constructor,this.install), and the section's own first sentence says "can also carry". The heading is now "Events can carry a random installation ID", and the one in-page link to it was updated.isBot()/pagePath()fallbacks. The README never said thatisBot()treats a missing, empty or blank User-Agent as a bot, even though the middleware example depends on it. It also never said thatpagePath()returns/for a non-string or an unparseable absolute URL, or that it adds a missing leading slash. Both are now stated, matching the TSDoc and the code.MAX_VERSION_LENGTHTSDoc. It now says the constant also boundsinstallId, which the constructor enforces and the README already says. Only the comment changed.CHANGELOG.md[Unreleased]bullet records the doc changes.No tracking issue: these gaps were found during the sweep.
Skipped issues
User-Agentinsend(), which is wire format. It is on the do-not-auto-merge list and needs a coordinated decision across the Python and Java clients.enabledfails open): this is an owner decision on opt-out semantics shared with the Python and Java clients.Cross-client parity
No cross-client-visible behavior changed. Only docs and one doc comment were edited, so trace-client-python and trace-client-java need no matching change.
Test plan
testjob green (npm ci,npm run typecheck,npm teston Node 22). Node is not available in the session environment, so CI on the head SHA is the anchor. The onlytrace-client.tschange is a doc comment.grepconfirms no remaining reference to the old heading anchor.This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson